package com.reliable.service.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 会话中IP出现记录对象 reliable_session_ip_occurrences
 *
 * @author ruoyi
 * @date 2025-11-10
 */
@Data
@ApiModel(value = "会话中IP出现记录对象")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReliableSessionIpOccurrences extends BaseEntitys {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键", position = 0)
    private Long id;

    /**
     * 会话ID，来自 chat_messages.session_id
     */
    @ApiModelProperty(value = "会话ID，来自 chat_messages.session_id", position = 1)
    private String sessionId;

    /**
     * 客户端IP地址
     */
    @ApiModelProperty(value = "客户端IP地址", position = 2)
    private String ip;

    /**
     * 该IP在本会话中首次出现时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "该IP在本会话中首次出现时间", position = 3)
    private Date firstSeenAt;

    /**
     * 该IP在本会话中最后出现时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "该IP在本会话中最后出现时间", position = 4)
    private Date lastSeenAt;

    /**
     * 该IP在本会话中的消息条数
     */
    @ApiModelProperty(value = "该IP在本会话中的消息条数", position = 5)
    private Integer messageCount = 1;

    /**
     * 记录创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "记录创建时间", position = 6)
    private Date createdAt;

    /**
     * 记录更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
    @ApiModelProperty(value = "记录更新时间", position = 7)
    private Date updatedAt;

}